package demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-11-06
 * Time: 16:39
 */
class Dog {
    public String name;
    public int age;
    public String color;

    public void eat() {
        System.out.println(this.age+this.color+this.name+"吃饭！");
    }
}

public class Test1 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.name = "xiaoqi";
        dog.age = 2;
        dog.color = "brown";
        dog.eat();
    }
}
